from typing import *


class Solution:
    def maximumDetonation(self, bombs: List[List[int]]) -> int:
        n = len(bombs)
        f = [0] * n
        for i, (x, y, r) in enumerate(bombs):
            for j, (a, b, c) in enumerate(bombs):
                p, q = a - x, b - y
                if p * p + q * q <= r * r:
                    f[i] |= 1 << j

        for k in range(n):
            for i in range(n):
                if f[i] >> k & 1:
                    f[i] |= f[k]
        return max(i.bit_count() for i in f)


f = [[[i + 3 * 5 * k + j * 5 for i in range(5)] for j in range(3)] for k in range(2)]
print(f)
for a in f:
    for b in a:
        print(b)
[
    [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14]],
    [[15, 16, 17, 18, 19], [20, 21, 22, 23, 24], [25, 26, 27, 28, 29]],
]
